package com.tianjipms.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tianjipms.entity.Parking;
import org.apache.ibatis.annotations.Select;

public interface ParkingMapper extends BaseMapper<Parking> {
    @Select("select p.id, p.vehicl_id, p.enter_time from sys_parking p join sys_vehicl v on p.vehicl_id = v.id where v.license_number = #{licenseNumber};")
    Parking parkingByLicenseNumber(String licenseNumber);
    @Select("select COUNT(*) from sys_parking p join sys_vehicl v on p.vehicl_id = v.id where is_vip = #{isVip};")
    Integer countByisVip(Integer isVip);
}
